package com.maya.medicalwastes.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.maya.medicalwastes.R;
import com.maya.medicalwastes.entity.CollectBean;
import com.maya.medicalwastes.util.SearchType;

import java.util.List;

/**
 * @author created by fuguoyong
 * 版本：1.0
 * 创建日期：2020-11-19 13
 * 描述：OutputAdapter
 */
public class OutputAdapter extends BaseQuickAdapter<CollectBean, BaseViewHolder> {
    public OutputAdapter(int layoutResId, @Nullable List<CollectBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CollectBean item) {
        helper.setText(R.id.tv_type, SearchType.getWareType(item.getGarbageCategory()) == null ? "" : SearchType.getWareType(item.getGarbageCategory())).setText(R.id.tv_scan_numb, item.getGarbageId() == null ? "" : item.getGarbageId())
                  .setText(R.id.tv_numb, item.getBatchNumber() == null ? "" : item.getBatchNumber()).setText(R.id.tv_index,helper.getLayoutPosition()+1+"");
//        helper.addOnClickListener(R.id.btn_relevancy);
//        helper.addOnClickListener(R.id.btn_up);

    }
}
